package com.xianggu.demo.pattern.chair;

import java.util.ArrayList;
import java.util.List;

public class ChainOfResponsibilityDemo {
    public static void main(String[] args) {
        // 创建审批者链
        Approver generalManager = new GeneralManagerApprover(null);
        Approver departmentManager = new DepartmentManagerApprover(generalManager);
        Approver projectManager = new ProjectManagerApprover(departmentManager);
        // 责任链
        List<Approver> auditList = new ArrayList<>();

        // 测试请假请求

        LeaveRequest request3 = new LeaveRequest(5);
        projectManager.processRequest(request3);

    }
}